<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var minSteps = function (s, t) {
      let hash = {}
      for (let c of s) {
        hash[c] = ++hash[c] || 1
      }
      for (let c of t) {
        if (hash[c]) hash[c]--
      }
      let ans = 0
      for (let k in hash) {
        ans += hash[k]
      }
      return ans
    };
    console.log(minSteps(s = "bab", t = "aba"));
  </script>
</body>

</html>